libxc: Handle failed xc_get_hvm_param in domain save
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Fri, 25 Feb 2011 17:26:18 +0000 (17:26 +0000)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Fri, 25 Feb 2011 17:26:18 +0000 (17:26 +0000)
commitc15cad7df60be4de55233fd32a7f60a15886d226
treef324f034c7e13a0dccfba123bc755f462484ba8b
parent8bcd286054acdc3431ad342b647a162048867fbc
libxc: Handle failed xc_get_hvm_param in domain save

The domain save code will read an HVM param, and if it's not zero,
make an entry for it.  However, if the hypercall fails for any reason,
the data may not be written, and the value for the previous parameter
may be written in the save file as the parameter that failed.

Initialize the value to zero before each hypercall, so that in case of
a failure, no value will be written.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_domain_save.c